﻿namespace WebApp.Common
{
    public class PageSetting
    {
        private const string TitleTemplate = "Sanelib - {0}";
        private const string NotApplicable = "";

        public PageSetting(string pageName, string linkName, string linkUrl, string activeLink, string bannerPartial = null, LinkData[] pathLinks = null)
        {
            PageName = pageName;
            LinkName = linkName;
            LinkUrl = linkUrl;
            ActiveLink = activeLink;
            BannerPartial = bannerPartial;
            PathLinks = pathLinks ?? new LinkData[0];
        }

        public string Title { get { return string.Format(TitleTemplate, PageName); } }

        public static string GetTitleTemplate()
        {
            return TitleTemplate;
        }

        public string PageName { get; set; }
        public string LinkName { get; set; }
        public string LinkUrl { get; set; }
        public string ActiveLink { get; set; }
        public string BannerPartial { get; set; }

        public LinkData[] PathLinks { get; set; }

        public class LinkData
        {
            public string LinkName { get; set; }
            public string LinkUrl { get; set; }
        }

        public static PageSetting HomePageSetting = new PageSetting("Home", "HOME", "/home", "HOME", "_HomeBanner");

        public static PageSetting ProductPageSetting = new PageSetting("Products", "PRODUCTS", "/home/products", "PRODUCTS");

        public static PageSetting ServicePageSetting = new PageSetting("Services", "SERVICES", "/home/services", "SERVICES", null, new[]
        {
            new LinkData
            {
                LinkName = "SALESFORCE",
                LinkUrl = "#salesforce"
            },
            new LinkData
            {
                LinkName = "CUSTOM APPS",
                LinkUrl = "#customApp"
            },
            new LinkData
            {
                LinkName = "Webshop & CMS",
                LinkUrl = "#webshopCms"
            }
        });

        public static PageSetting AboutUsPageSetting = new PageSetting("Know more about us", "ABOUT US", "/home/about", "ABOUT US");

        public static PageSetting JoinUsPageSetting = new PageSetting("Grow with \"sanelib\"", "JOIN US", "/home/join", "JOIN US");

        public static PageSetting SuccessPageSetting = new PageSetting("Success", NotApplicable, NotApplicable, NotApplicable);

        public static PageSetting ReachUsPageSetting = new PageSetting("Happy to help", "REACH US", "/home/reach", "REACH US");

        public static PageSetting SignInPageSetting = new PageSetting("Sign In / Recover / Register", "SIGN IN", "/auth", "SIGN IN");

        public static PageSetting SignOutPageSetting = new PageSetting("Sign Out", "SIGN OUT", "/auth/signout", "SIGN OUT");

        public static PageSetting DashboardPageSetting = new PageSetting("Dashboard", "DASHBOARD", "/dashboard", "DASHBOARD");

        #region Member

        public static PageSetting MemberListPageSetting = new PageSetting("Member List", "MEMBERS", "/member", "MEMBERS");

        public static PageSetting MemberNewPageSetting = new PageSetting("New Member", "ADD NEW", "/member/new", "MEMBERS", null, new[]
        {
            new LinkData
            {
                LinkName = "MEMBER",
                LinkUrl = "/member"
            }
        });

        public static PageSetting MemberShowPageSetting = new PageSetting("Member Detail", "MEMBER DETAIL", "/member/show", "MEMBERS", null, new[]
        {
            new LinkData
            {
                LinkName = "MEMBER",
                LinkUrl = "/member"
            }
        });

        public static PageSetting MemberEditPageSetting = new PageSetting("Edit Member", "EDIT MEMBER", "/member/edit", "MEMBERS", null, new[]
        {
            new LinkData
            {
                LinkName = "MEMBER",
                LinkUrl = "/member"
            }
        });
        #endregion

        #region Contact
        public static PageSetting ContactListPageSetting = new PageSetting("Contact List", "CONTACTS", "/contact", "CONTACTS");

        public static PageSetting ContactNewPageSetting = new PageSetting("New Contact", "ADD NEW", "/contact/new", "CONTACTS", null, new[]
        {
            new LinkData
            {
                LinkName = "CONTACT",
                LinkUrl = "/contact"
            }
        });

        public static PageSetting ContactShowPageSetting = new PageSetting("Contact Detail", "CONTACT DETAIL", "/contact/show", "CONTACTS", null, new[]
        {
            new LinkData
            {
                LinkName = "CONTACT",
                LinkUrl = "/contact"
            }
        });

        public static PageSetting ContactEditPageSetting = new PageSetting("Edit Contact", "EDIT CONTACT", "/contact/edit", "CONTACTS", null, new[]
        {
            new LinkData
            {
                LinkName = "CONTACT",
                LinkUrl = "/contact"
            }
        });
        #endregion

        #region Account
        public static PageSetting AccountListPageSetting = new PageSetting("Account List", "ACCOUNTS", "/account", "ACCOUNTS");
        public static PageSetting AccountNewPageSetting = new PageSetting("New Account", "ADD NEW", "/account/new", "ACCOUNTS", null, new[]
        {
            new LinkData
            {
                LinkName = "ACCOUNTS",
                LinkUrl = "/account"
            }
        });

        public static PageSetting AccountShowPageSetting = new PageSetting("Account Detail", "ACCOUNT DETAIL", "/account/show", "ACCOUNTS", null, new[]
        {
            new LinkData
            {
                LinkName = "ACCOUNT",
                LinkUrl = "/account"
            }
        });

        public static PageSetting AccountEditPageSetting = new PageSetting("Edit Account", "EDIT ACCOUNT", "/account/edit", "ACCOUNTS", null, new[]
        {
            new LinkData
            {
                LinkName = "ACCOUNT",
                LinkUrl = "/account"
            }
        });
        #endregion

        #region Folder
        public static PageSetting FolderListPageSetting = new PageSetting("Folder List", "FOLDERS", "/folder", "FOLDERS");

        public static PageSetting FolderNewPageSetting = new PageSetting("New Folder", "ADD NEW", "/folder/new", "FOLDERS", null, new[]
        {
            new LinkData
            {
                LinkName = "FOLDER",
                LinkUrl = "/folder"
            }
        });

        public static PageSetting FolderShowPageSetting = new PageSetting("Folder Detail", "FOLDER DETAIL", "/folder/show", "FOLDERS", null, new[]
        {
            new LinkData
            {
                LinkName = "FOLDER",
                LinkUrl = "/folder"
            }
        });

        public static PageSetting FolderEditPageSetting = new PageSetting("Edit Folder", "EDIT FOLDER", "/folder/edit", "FOLDERS", null, new[]
        {
            new LinkData
            {
                LinkName = "FOLDER",
                LinkUrl = "/folder"
            }
        });
        #endregion

        #region Lead
        public static PageSetting LeadListPageSetting = new PageSetting("Lead List", "LEADS", "/lead", "LEADS");
        public static PageSetting LeadNewPageSetting = new PageSetting("New Lead", "ADD NEW", "/lead/new", "LEAD", null, new[]
        {
            new LinkData
            {
                LinkName = "LEAD",
                LinkUrl = "/lead"
            }
        });

        public static PageSetting LeadShowPageSetting = new PageSetting("Lead Detail", "LEAD DETAIL", "/lead/show", "LEAD", null, new[]
        {
            new LinkData
            {
                LinkName = "LEAD",
                LinkUrl = "/lead"
            }
        });

        public static PageSetting LeadEditPageSetting = new PageSetting("Edit Lead", "EDIT LEAD", "/lead/edit", "LEAD", null, new[]
        {
            new LinkData
            {
                LinkName = "LEAD",
                LinkUrl = "/lead"
            }
        });
        #endregion

        #region Track Log
        public static PageSetting TrackLogListPageSetting = new PageSetting("Track Log List", "TRACK LOGS", "/tracklog", "TRACK LOG");
        public static PageSetting TrackLogNewPageSetting = new PageSetting("New Track Log", "ADD NEW", "/trackLog/new", "TRACK LOG", null, new[]
        {
            new LinkData
            {
                LinkName = "TRACK LOG",
                LinkUrl = "/tracklog"
            }
        });

        public static PageSetting TrackLogShowPageSetting = new PageSetting("Track Log Detail", "TRACK LOG DETAIL", "/trackLog/show", "TRACK LOG", null, new[]
        {
            new LinkData
            {
                LinkName = "TRACK LOG",
                LinkUrl = "/trackLog"
            }
        });

        public static PageSetting TrackLogEditPageSetting = new PageSetting("Edit Track Log", "EDIT TRACK LOG", "/trackLog/edit", "TRACK LOG", null, new[]
        {
            new LinkData
            {
                LinkName = "TRACK LOG",
                LinkUrl = "/tracklog"
            }
        });
        #endregion

        #region Task Log
        public static PageSetting TaskLogListPageSetting = new PageSetting("Task Log List", "TASK LOGS", "/taskLog", "TASK LOG");
        public static PageSetting TaskLogNewPageSetting = new PageSetting("New Task Log", "ADD NEW", "/taskLog/new", "TASK LOG", null, new[]
        {
            new LinkData
            {
                LinkName = "TASK LOG",
                LinkUrl = "/tasklog"
            }
        });

        public static PageSetting TaskLogShowPageSetting = new PageSetting("Task Log Detail", "TASK LOG DETAIL", "/taskLog/show", "TASK LOG", null, new[]
        {
            new LinkData
            {
                LinkName = "TASK LOG",
                LinkUrl = "/tasklog"
            }
        });

        public static PageSetting TaskLogEditPageSetting = new PageSetting("Edit Task Log", "EDIT TASK LOG", "/taskLog/edit", "TASK LOG", null, new[]
        {
            new LinkData
            {
                LinkName = "TASK LOG",
                LinkUrl = "/tasklog"
            }
        }); 
        #endregion

        public static PageSetting ScriptGeneratorPageSetting = new PageSetting("Script Generator", "SCRIPT GENERATOR", "/generator", "SCRIPT GENERATOR");
        public static PageSetting ConfigurationPageSetting = new PageSetting("Core Configuration", "CONFIGURATION", "/coreConfiguration", "CONFIGURATION");

        #region Template
        public static PageSetting TemplatePageSetting = new PageSetting("Template", "TEMPLATES", "/template", "TEMPLATE");
        public static PageSetting TemplateNewPageSetting = new PageSetting("New Template", "ADD NEW", "/template/new", "TEMPLATE", null, new[]
        {
            new LinkData
            {
                LinkName = "TEMPLATE",
                LinkUrl = "/template"
            }
        });

        public static PageSetting TemplateShowPageSetting = new PageSetting("Template Detail", "TEMPLATE DETAIL", "/template/show", "TEMPLATE", null, new[]
        {
            new LinkData
            {
                LinkName = "TEMPLATE",
                LinkUrl = "/template"
            }
        });

        public static PageSetting TemplateEditPageSetting = new PageSetting("Edit Template", "EDIT TEMPLATE", "/template/edit", "TEMPLATE", null, new[]
        {
            new LinkData
            {
                LinkName = "TEMPLATE",
                LinkUrl = "/template"
            }
        }); 
        #endregion

         public static PageSetting SearchPageSetting  = new PageSetting("Search","SEARCH","/search","SEARCH");
    }
}